@using Seal.Model
@using Seal.Helpers
@{
    Report report = Model;
    ReportView view = report.CurrentView;
    Repository repository = report.Repository;
    view.IdSuffix = Guid.NewGuid().ToString().Replace("-", "");
    foreach (ReportView childView in view.Views)
    {
        childView.IdSuffix = Guid.NewGuid().ToString().Replace("-", "");
    }
}

<script>
    $(document).ready(function () {
        $('#tc_@(view.IdSuffix) li:eq(@view.GetNumericValue("tab_selected_index")) a').tab('show');
        $('#tc_@(view.IdSuffix) a').click(function (e) {
            if (@Helper.ToJS(report.GenerateHTMLDisplay)) processSubmitViewParameter("tab_selected_index", $($(this).attr('href')).index(), "@view.ViewId");
            @if (report.HasNVD3Chart)
            {<text>
            redrawNVD3Charts();
            </text>
            }
            redrawDataTables();
        });
    });
</script>

@if (!report.PrintLayout && view.GetValue("tab_position") == "right")
{
    <div class="row">
        <div class="tab-content col-md-@(12-view.GetNumericValue("tab_menu_width"))">
            @Include(view.GetPartialTemplateKey("TabControl.iContent", view), view)
        </div>
        <div class="col-md-@view.GetNumericValue("tab_menu_width")">
            @Include(view.GetPartialTemplateKey("TabControl.iMenu", view), view)
        </div>
    </div>
}
else if (!report.PrintLayout && view.GetValue("tab_position") == "left")
{
    <div class="row">
        <div class="col-md-@view.GetNumericValue("tab_menu_width")">
            @Include(view.GetPartialTemplateKey("TabControl.iMenu", view), view)
        </div>
        <div class="tab-content col-md-@(12-view.GetNumericValue("tab_menu_width"))">
            @Include(view.GetPartialTemplateKey("TabControl.iContent", view), view)
        </div>
    </div>
}
else
{
    @Include(view.GetPartialTemplateKey("TabControl.iMenu", view), view)
    <div class="tab-content">
        @Include(view.GetPartialTemplateKey("TabControl.iContent", view), view)
    </div>
}
<!--_tab_control-->
